// Created from GenerationTemplate
// For Decisions HL7 Engine
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Reflection;
using DecisionsFramework.Design.Properties;
using Decisions.HL7.Generated.AbstractMessage;
using Decisions.HL7.DataTypes;
using ST = System.String;
using SI = System.String;
using TX = System.String;
using FT = System.String;
using IS = System.String;
using ID = System.String;
using SNM = System.String;

namespace Decisions.HL7.Message
{
    [DataContract]
	public class DRG : AbstractSegment
    {

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("1 Diagnostic Related Group",1)]
  	    [HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.True,"CE_0055")]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.True,"CE_0055")]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.True,"CE_0055")]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.True,"CNE")]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.True,"CNE")]
		[DiagnosisRelatedGroup]
	    public CNE DiagnosticRelatedGroup {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("2 DRG Assigned Date/Time",2)]
  	    [HL7Field(HL7Version.v23, 2, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 2, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 2, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 2, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 2, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 2, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 2, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM DRGAssignedDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("3 DRG Approval Indicator",3)]
  	    [HL7Field(HL7Version.v23, 3, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 3, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 3, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 3, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 3, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 3, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 3, HL7Repeat.False, HL7Required.True,"ID")]
		[YesnoIndicator]
	    public ID DRGApprovalIndicator {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("4 DRG Grouper Review Code",4)]
  	    [HL7Field(HL7Version.v23, 4, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v231, 4, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 4, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 4, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 4, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 4, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 4, HL7Repeat.False, HL7Required.True,"CWE")]
		[DRGGrouperReviewCode]
	    public CWE DRGGrouperReviewCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("5 Outlier Type",5)]
  	    [HL7Field(HL7Version.v23, 5, HL7Repeat.False, HL7Required.True,"CE_0083")]
  	    [HL7Field(HL7Version.v231, 5, HL7Repeat.False, HL7Required.True,"CE_0083")]
  	    [HL7Field(HL7Version.v24, 5, HL7Repeat.False, HL7Required.True,"CE_0083")]
  	    [HL7Field(HL7Version.v25, 5, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 5, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 5, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 5, HL7Repeat.False, HL7Required.True,"CWE")]
		[OutlierType]
	    public CWE OutlierType {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("6 Outlier Days",6)]
  	    [HL7Field(HL7Version.v23, 6, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 6, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 6, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 6, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 6, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 6, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 6, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM OutlierDays {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("7 Outlier Cost",7)]
  	    [HL7Field(HL7Version.v23, 7, HL7Repeat.False, HL7Required.True,"CP")]
  	    [HL7Field(HL7Version.v231, 7, HL7Repeat.False, HL7Required.True,"CP")]
  	    [HL7Field(HL7Version.v24, 7, HL7Repeat.False, HL7Required.True,"CP")]
  	    [HL7Field(HL7Version.v25, 7, HL7Repeat.False, HL7Required.True,"CP")]
  	    [HL7Field(HL7Version.v251, 7, HL7Repeat.False, HL7Required.True,"CP")]
  	    [HL7Field(HL7Version.v26, 7, HL7Repeat.False, HL7Required.True,"CP")]
  	    [HL7Field(HL7Version.v27, 7, HL7Repeat.False, HL7Required.True,"CP")]
	    public CP OutlierCost {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("8 DRG Payor",8)]
  	    [HL7Field(HL7Version.v23, 8, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v231, 8, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 8, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 8, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 8, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 8, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 8, HL7Repeat.False, HL7Required.True,"CWE")]
		[DRGPayor]
	    public CWE DRGPayor {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("9 Outlier Reimbursement",9)]
  	    [HL7Field(HL7Version.v23, 9, HL7Repeat.False, HL7Required.True,"CP")]
  	    [HL7Field(HL7Version.v231, 9, HL7Repeat.False, HL7Required.True,"CP")]
  	    [HL7Field(HL7Version.v24, 9, HL7Repeat.False, HL7Required.True,"CP")]
  	    [HL7Field(HL7Version.v25, 9, HL7Repeat.False, HL7Required.True,"CP")]
  	    [HL7Field(HL7Version.v251, 9, HL7Repeat.False, HL7Required.True,"CP")]
  	    [HL7Field(HL7Version.v26, 9, HL7Repeat.False, HL7Required.True,"CP")]
  	    [HL7Field(HL7Version.v27, 9, HL7Repeat.False, HL7Required.True,"CP")]
	    public CP OutlierReimbursement {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("10 Confidential Indicator",10)]
  	    [HL7Field(HL7Version.v23, 10, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 10, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 10, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 10, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 10, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 10, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 10, HL7Repeat.False, HL7Required.True,"ID")]
		[YesnoIndicator]
	    public ID ConfidentialIndicator {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("11 DRG Transfer Type",11)]
  	    [HL7Field(HL7Version.v24, 11, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 11, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 11, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 11, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 11, HL7Repeat.False, HL7Required.True,"CWE")]
		[DRGTransferType]
	    public CWE DRGTransferType {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("12 Name of Coder",12)]
  	    [HL7Field(HL7Version.v26, 12, HL7Repeat.False, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v27, 12, HL7Repeat.False, HL7Required.True,"XPN")]
	    public XPN NameofCoder {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("13 Grouper Status",13)]
  	    [HL7Field(HL7Version.v26, 13, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 13, HL7Repeat.False, HL7Required.True,"CWE")]
		[GrouperStatus]
	    public CWE GrouperStatus {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("14 PCCL Value Code",14)]
  	    [HL7Field(HL7Version.v26, 14, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 14, HL7Repeat.False, HL7Required.True,"CWE")]
		[CCLValue]
	    public CWE PCCLValueCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("15 Effective Weight",15)]
  	    [HL7Field(HL7Version.v26, 15, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 15, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM EffectiveWeight {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("16 Monetary Amount",16)]
  	    [HL7Field(HL7Version.v26, 16, HL7Repeat.False, HL7Required.True,"MO")]
  	    [HL7Field(HL7Version.v27, 16, HL7Repeat.False, HL7Required.True,"MO")]
	    public MO MonetaryAmount {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("17 Status Patient",17)]
  	    [HL7Field(HL7Version.v26, 17, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 17, HL7Repeat.False, HL7Required.True,"CWE")]
		[StatusPatient]
	    public CWE StatusPatient {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("18 Grouper Software Name",18)]
  	    [HL7Field(HL7Version.v26, 18, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v27, 18, HL7Repeat.False, HL7Required.True,"ST")]
	    public ST GrouperSoftwareName {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("19 Grouper Software Version",19)]
  	    [HL7Field(HL7Version.v26, 19, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v27, 19, HL7Repeat.False, HL7Required.True,"ST")]
	    public ST GrouperSoftwareVersion {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("20 Status Financial Calculation",20)]
  	    [HL7Field(HL7Version.v26, 20, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 20, HL7Repeat.False, HL7Required.True,"CWE")]
		[DRGStatusFinancialCalculation]
	    public CWE StatusFinancialCalculation {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("21 Relative Discount/Surcharge",21)]
  	    [HL7Field(HL7Version.v26, 21, HL7Repeat.False, HL7Required.True,"MO")]
  	    [HL7Field(HL7Version.v27, 21, HL7Repeat.False, HL7Required.True,"MO")]
	    public MO RelativeDiscountSurcharge {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("22 Basic Charge",22)]
  	    [HL7Field(HL7Version.v26, 22, HL7Repeat.False, HL7Required.True,"MO")]
  	    [HL7Field(HL7Version.v27, 22, HL7Repeat.False, HL7Required.True,"MO")]
	    public MO BasicCharge {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("23 Total Charge",23)]
  	    [HL7Field(HL7Version.v26, 23, HL7Repeat.False, HL7Required.True,"MO")]
  	    [HL7Field(HL7Version.v27, 23, HL7Repeat.False, HL7Required.True,"MO")]
	    public MO TotalCharge {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("24 Discount/Surcharge",24)]
  	    [HL7Field(HL7Version.v26, 24, HL7Repeat.False, HL7Required.True,"MO")]
  	    [HL7Field(HL7Version.v27, 24, HL7Repeat.False, HL7Required.True,"MO")]
	    public MO DiscountSurcharge {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("25 Calculated Days",25)]
  	    [HL7Field(HL7Version.v26, 25, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 25, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM CalculatedDays {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("26 Status Gender",26)]
  	    [HL7Field(HL7Version.v26, 26, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 26, HL7Repeat.False, HL7Required.True,"CWE")]
		[DRGGroupingStatus]
	    public CWE StatusGender {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("27 Status Age",27)]
  	    [HL7Field(HL7Version.v26, 27, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 27, HL7Repeat.False, HL7Required.True,"CWE")]
		[DRGGroupingStatus]
	    public CWE StatusAge {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("28 Status Length of Stay",28)]
  	    [HL7Field(HL7Version.v26, 28, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 28, HL7Repeat.False, HL7Required.True,"CWE")]
		[DRGGroupingStatus]
	    public CWE StatusLengthofStay {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("29 Status Same Day Flag",29)]
  	    [HL7Field(HL7Version.v26, 29, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 29, HL7Repeat.False, HL7Required.True,"CWE")]
		[DRGGroupingStatus]
	    public CWE StatusSameDayFlag {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("30 Status Separation Mode",30)]
  	    [HL7Field(HL7Version.v26, 30, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 30, HL7Repeat.False, HL7Required.True,"CWE")]
		[DRGGroupingStatus]
	    public CWE StatusSeparationMode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("31 Status Weight at Birth",31)]
  	    [HL7Field(HL7Version.v26, 31, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 31, HL7Repeat.False, HL7Required.True,"CWE")]
		[StatusWeightAtBirth]
	    public CWE StatusWeightatBirth {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("32 Status Respiration Minutes",32)]
  	    [HL7Field(HL7Version.v26, 32, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 32, HL7Repeat.False, HL7Required.True,"CWE")]
		[StatusRespirationMinutes]
	    public CWE StatusRespirationMinutes {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("33 Status Admission",33)]
  	    [HL7Field(HL7Version.v26, 33, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 33, HL7Repeat.False, HL7Required.True,"CWE")]
		[StatusAdmission]
	    public CWE StatusAdmission {get;set;}


	    [DataMember]
        [PropertyClassification("AdditionalValue1", 34)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue1 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue2", 35)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue2 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue3", 36)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue3 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue4", 37)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue4 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue5", 38)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue5 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue6", 39)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue6 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue7", 40)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue7 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue8", 41)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue8 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue9", 42)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue9 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue10", 43)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue10 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue11", 44)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue11 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue12", 45)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue12 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue13", 46)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue13 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue14", 47)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue14 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue15", 48)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue15 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue16", 49)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue16 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue17", 50)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue17 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue18", 51)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue18 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue19", 52)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue19 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue20", 53)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue20 { get; set; }

	

		internal override void ConsumeTextSegment(string segmentTextData, HL7ParserOptions options)
		{
			string[] segmentTextParts = segmentTextData.Split(new char[] { options.FieldSep }, StringSplitOptions.None);
			DiagnosticRelatedGroup = (CNE)ParseTextAtPositionIntoData(segmentTextParts, 1, options, typeof(CNE), "DRG.1");
			DRGAssignedDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 2, options, typeof(DTM), "DRG.2");
			DRGApprovalIndicator = (ID)ParseTextAtPositionIntoData(segmentTextParts, 3, options, typeof(ID), "DRG.3");
			DRGGrouperReviewCode = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 4, options, typeof(CWE), "DRG.4");
			OutlierType = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 5, options, typeof(CWE), "DRG.5");
			OutlierDays = (NM)ParseTextAtPositionIntoData(segmentTextParts, 6, options, typeof(NM), "DRG.6");
			OutlierCost = (CP)ParseTextAtPositionIntoData(segmentTextParts, 7, options, typeof(CP), "DRG.7");
			DRGPayor = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 8, options, typeof(CWE), "DRG.8");
			OutlierReimbursement = (CP)ParseTextAtPositionIntoData(segmentTextParts, 9, options, typeof(CP), "DRG.9");
			ConfidentialIndicator = (ID)ParseTextAtPositionIntoData(segmentTextParts, 10, options, typeof(ID), "DRG.10");
			DRGTransferType = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 11, options, typeof(CWE), "DRG.11");
			NameofCoder = (XPN)ParseTextAtPositionIntoData(segmentTextParts, 12, options, typeof(XPN), "DRG.12");
			GrouperStatus = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 13, options, typeof(CWE), "DRG.13");
			PCCLValueCode = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 14, options, typeof(CWE), "DRG.14");
			EffectiveWeight = (NM)ParseTextAtPositionIntoData(segmentTextParts, 15, options, typeof(NM), "DRG.15");
			MonetaryAmount = (MO)ParseTextAtPositionIntoData(segmentTextParts, 16, options, typeof(MO), "DRG.16");
			StatusPatient = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 17, options, typeof(CWE), "DRG.17");
			GrouperSoftwareName = (ST)ParseTextAtPositionIntoData(segmentTextParts, 18, options, typeof(ST), "DRG.18");
			GrouperSoftwareVersion = (ST)ParseTextAtPositionIntoData(segmentTextParts, 19, options, typeof(ST), "DRG.19");
			StatusFinancialCalculation = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 20, options, typeof(CWE), "DRG.20");
			RelativeDiscountSurcharge = (MO)ParseTextAtPositionIntoData(segmentTextParts, 21, options, typeof(MO), "DRG.21");
			BasicCharge = (MO)ParseTextAtPositionIntoData(segmentTextParts, 22, options, typeof(MO), "DRG.22");
			TotalCharge = (MO)ParseTextAtPositionIntoData(segmentTextParts, 23, options, typeof(MO), "DRG.23");
			DiscountSurcharge = (MO)ParseTextAtPositionIntoData(segmentTextParts, 24, options, typeof(MO), "DRG.24");
			CalculatedDays = (NM)ParseTextAtPositionIntoData(segmentTextParts, 25, options, typeof(NM), "DRG.25");
			StatusGender = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 26, options, typeof(CWE), "DRG.26");
			StatusAge = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 27, options, typeof(CWE), "DRG.27");
			StatusLengthofStay = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 28, options, typeof(CWE), "DRG.28");
			StatusSameDayFlag = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 29, options, typeof(CWE), "DRG.29");
			StatusSeparationMode = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 30, options, typeof(CWE), "DRG.30");
			StatusWeightatBirth = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 31, options, typeof(CWE), "DRG.31");
			StatusRespirationMinutes = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 32, options, typeof(CWE), "DRG.32");
			StatusAdmission = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 33, options, typeof(CWE), "DRG.33");
		}

		public string GetER7(HL7ParserOptions options) {
			List<string> segmentParts = new List<string>();
			segmentParts.Add("DRG");
			segmentParts.Add(GetER7TextForSegmentPart(DiagnosticRelatedGroup, options));
			segmentParts.Add(GetER7TextForSegmentPart(DRGAssignedDateTime, options));
		    segmentParts.Add(DRGApprovalIndicator);
			segmentParts.Add(GetER7TextForSegmentPart(DRGGrouperReviewCode, options));
			segmentParts.Add(GetER7TextForSegmentPart(OutlierType, options));
			segmentParts.Add(GetER7TextForSegmentPart(OutlierDays, options));
			segmentParts.Add(GetER7TextForSegmentPart(OutlierCost, options));
			segmentParts.Add(GetER7TextForSegmentPart(DRGPayor, options));
			segmentParts.Add(GetER7TextForSegmentPart(OutlierReimbursement, options));
		    segmentParts.Add(ConfidentialIndicator);
			segmentParts.Add(GetER7TextForSegmentPart(DRGTransferType, options));
			segmentParts.Add(GetER7TextForSegmentPart(NameofCoder, options));
			segmentParts.Add(GetER7TextForSegmentPart(GrouperStatus, options));
			segmentParts.Add(GetER7TextForSegmentPart(PCCLValueCode, options));
			segmentParts.Add(GetER7TextForSegmentPart(EffectiveWeight, options));
			segmentParts.Add(GetER7TextForSegmentPart(MonetaryAmount, options));
			segmentParts.Add(GetER7TextForSegmentPart(StatusPatient, options));
		    segmentParts.Add(GrouperSoftwareName);
		    segmentParts.Add(GrouperSoftwareVersion);
			segmentParts.Add(GetER7TextForSegmentPart(StatusFinancialCalculation, options));
			segmentParts.Add(GetER7TextForSegmentPart(RelativeDiscountSurcharge, options));
			segmentParts.Add(GetER7TextForSegmentPart(BasicCharge, options));
			segmentParts.Add(GetER7TextForSegmentPart(TotalCharge, options));
			segmentParts.Add(GetER7TextForSegmentPart(DiscountSurcharge, options));
			segmentParts.Add(GetER7TextForSegmentPart(CalculatedDays, options));
			segmentParts.Add(GetER7TextForSegmentPart(StatusGender, options));
			segmentParts.Add(GetER7TextForSegmentPart(StatusAge, options));
			segmentParts.Add(GetER7TextForSegmentPart(StatusLengthofStay, options));
			segmentParts.Add(GetER7TextForSegmentPart(StatusSameDayFlag, options));
			segmentParts.Add(GetER7TextForSegmentPart(StatusSeparationMode, options));
			segmentParts.Add(GetER7TextForSegmentPart(StatusWeightatBirth, options));
			segmentParts.Add(GetER7TextForSegmentPart(StatusRespirationMinutes, options));
			segmentParts.Add(GetER7TextForSegmentPart(StatusAdmission, options));
			return string.Join("" + options.FieldSep, segmentParts.ToArray());
		}

    }
}

